
//
// 120129 - AH - Created.
//

package org.soekrat.swing.network;

import java.awt.BorderLayout;
import java.awt.Container;

import javax.swing.JDialog;

import org.soekrat.engine.network.Cluster;
import org.soekrat.engine.network.Network;

/**
 * <p>
 *   Dialog to view
 *   {@link Cluster}s in a
 *   {@link ClusterListView}.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC) 
 */
@SuppressWarnings("serial")
public final class ClusterListViewDialog extends JDialog 
{
  private ClusterListView m_clv=new ClusterListView();
  
  /**
   * <p>
   *   Constructor.
   * </p>
   */
  public ClusterListViewDialog()
  {
    Container c=getContentPane();
    c.setLayout(new BorderLayout());
    
    c.add(m_clv, BorderLayout.CENTER);
    
    pack();
    setSize(300, 300);
  }
  
  public void showDialog(Network network)
  {
    m_clv.setNetwork(network);
    m_clv.update();
    setVisible(true);
  }
  
}
